<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content">
  <div class="top">
    <div class="left"></div>
    <div class="right"></div>
    <div class="center">
      <h1><?php echo $heading_title; ?></h1>
    </div>
  </div>
  <div class="middle">
    <?php if ($error_warning) { ?>
    <div class="warning"><?php echo $error_warning; ?></div>
    <?php } ?>
    <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="create">
      <b style="margin-bottom: 2px; display: block;font-size:14px;"><?php echo $text_your_details; ?></b>
      <div class="content">
        <table>
          <tr>
            <td width="150"><?php echo $entry_customername; ?></td>
            <td><input type="text" name="customername" value="<?php echo $customername; ?>" /><span class="required">(<font>*</font>)</span>
              <?php if ($error_customername) { ?>
              <span class="error"><?php echo $error_customername; ?></span>
              <?php } ?></td>
          </tr>
          <tr>
            <td><?php echo $entry_email; ?></td>
            <td><input type="text" name="email" value="<?php echo $email; ?>" /><span class="required">(<font>*</font>)</span>
              <?php if ($error_email) { ?>
              <span class="error"><?php echo $error_email; ?></span>
              <?php } ?></td>
          </tr>
          <tr>
            <td width="150"><?php echo $entry_password; ?></td>
            <td><input type="password" name="password" value="<?php echo $password; ?>" /><span class="required">(<font>*</font>)</span>
              <?php if ($error_password) { ?>
              <span class="error"><?php echo $error_password; ?></span>
              <?php } ?></td>
          </tr>
          <tr>
            <td><?php echo $entry_confirm; ?></td>
            <td><input type="password" name="confirm" value="<?php echo $confirm; ?>" /><span class="required">(<font>*</font>)</span>
              <?php if ($error_confirm) { ?>
              <span class="error"><?php echo $error_confirm; ?></span>
              <?php } ?></td>
          </tr>
          <tr>
            <td><?php echo $entry_telephone; ?></td>
            <td><input type="text" name="telephone" value="<?php echo $telephone; ?>" /><span class="required">(<font>*</font>)</span>
              <?php if ($error_telephone) { ?>
              <span class="error"><?php echo $error_telephone; ?></span>
              <?php } ?></td>
          </tr>
        </table>
      </div>
	<div class="address" style="margin-bottom:10px;">
      <b id="address" style="margin-bottom: 2px;padding-right:15px;cursor: pointer;font-size:14px;background: url(catalog/view/theme/default/image/arrow-down.png) no-repeat right center;"><?php echo $text_your_address; ?></b>
      <div class="content" style="display:none;">
        <table>
          <tr>
            <td width="150"><?php echo $entry_address; ?></td>
            <td><input type="text" name="address" value="<?php echo $address; ?>" /></td>
          </tr>
          <tr>
            <td><?php echo $entry_city; ?></td>
            <td><input type="text" name="city" value="<?php echo $city; ?>" /></td>
          </tr>
          <tr>
            <td><?php echo $entry_country; ?></td>
            <td><select name="country_id" id="country_id" onchange="$('select[name=\'zone_id\']').load('index.php?route=account/create/zone&country_id=' + this.value + '&zone_id=<?php echo $zone_id; ?>');">
                <option value="FALSE"><?php echo $text_select; ?></option>
                <?php foreach ($countries as $country) { ?>
                <option value="<?php echo $country['country_id']; ?>"><?php echo $country['name']; ?></option>
                <?php } ?>
              </select></td>
          </tr>
          <tr>
            <td><?php echo $entry_zone; ?></td>
            <td><select name="zone_id">
              </select></td>
          </tr>
        </table>
      </div>
	</div>
<input type="hidden" name="newsletter" value="1" />
      <?php if ($text_agree) { ?>
      <div class="buttons">
        <table>
          <tr>
            <td align="right" style="padding-right: 5px;"><?php echo $text_agree; ?></td>
            <td width="5" style="padding-top: 5px;"><?php if ($agree) { ?>
              <input type="checkbox" name="agree" value="1" checked="checked" />
              <?php } else { ?>
              <input type="checkbox" name="agree" value="1" />
              <?php } ?></td>
            <td align="right" width="70"><a onclick="$('#create').submit();" class="button"><span><?php echo $button_create; ?></span></a></td>
          </tr>
        </table>
      </div>
      <?php } else { ?>
      <div class="buttons">
        <table>
          <tr>
            <td align="right"><a onclick="$('#create').submit();" class="button"><span><?php echo $button_create; ?></span></a></td>
          </tr>
        </table>
      </div>
      <?php } ?>
    </form>
  </div>
  <div class="bottom">
    <div class="left"></div>
    <div class="right"></div>
    <div class="center"></div>
  </div>
</div>
<script language="javascript"> 
$('.address #address').click(function(event) {
	if ($(this).hasClass('active')) {
		$('.address .content').slideUp();
		$(this).removeClass('active');
	} else {
		$('.address .content').slideDown();
		$(this).addClass('active');
	}
	return false;
});
</script>
  <script type="text/javascript"><!--
$('select[name=\'zone_id\']').load('index.php?route=account/create/zone&country_id=<?php echo $country_id; ?>&zone_id=<?php echo $zone_id; ?>');

$('#country_id').attr('value', '<?php echo $country_id; ?>');
//--></script>
<?php echo $footer; ?> 